package com.example.demo.controller;

import com.example.demo.entity.Source;
import com.example.demo.mapper.ClassAvgMapper;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/getClassAvg")
@CrossOrigin
public class ClassAvgController {

    @Resource
    ClassAvgMapper classAvgMapper;

    @GetMapping("/classDashujuAvg")
    public List<Source> classDashujuAvg() {
        List<Source> sourceList = classAvgMapper.classDashujuAvg();
        return sourceList;
    }

    @GetMapping("/classJisuanjiyingyongAvg")
    public List<Source> classJisuanjiyingyongAvg() {
        List<Source> sourceList = classAvgMapper.classJisuanjiyingyongAvg();
        return sourceList;
    }

    @GetMapping("/classRuanjiangongchengAvg")
    public List<Source> classRuanjiangongchengAvg() {
        List<Source> sourceList = classAvgMapper.classRuanjiangongchengAvg();
        return sourceList;
    }

    @GetMapping("/classRuanjianjishuAvg")
    public List<Source> classRuanjianjishuAvg() {
        List<Source> sourceList = classAvgMapper.classRuanjianjishuAvg();
        return sourceList;
    }

    @GetMapping("/classWangluogongchengAvg")
    public List<Source> classWangluogongchengAvg() {
        List<Source> sourceList = classAvgMapper.classWangluogongchengAvg();
        return sourceList;
    }

    @GetMapping("/classWangluojishuAvg")
    public List<Source> classWangluojishuAvg() {
        List<Source> sourceList = classAvgMapper.classWangluojishuAvg();
        return sourceList;
    }

    @GetMapping("/classWulianwangAvg")
    public List<Source> classWulianwangAvg() {
        List<Source> sourceList = classAvgMapper.classWulianwangAvg();
        return sourceList;
    }

    @GetMapping("/classXinxiguanliAvg")
    public List<Source> classXinxiguanliAvg() {
        List<Source> sourceList = classAvgMapper.classXinxiguanliAvg();
        return sourceList;
    }



}
